package org.jeecg.modules.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.entity.WorkOrder;
import org.jeecg.modules.mapper.WorkOrderMapper;
import org.jeecg.modules.service.IServiceWorkOrderService;
import org.jeecg.modules.vo.ServiceWorkOrderVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ServiceWorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder> implements IServiceWorkOrderService {
    @Resource
    private WorkOrderMapper workOrderMapper;

    @Override
    public IPage<ServiceWorkOrderVo> findServiceWork(Page page, ServiceWorkOrderVo serviceWorkOrderVo) {
        return page.setRecords(workOrderMapper.findServiceWorkOrder(page,serviceWorkOrderVo));
    }

    @Override
    public int countServiceWork(ServiceWorkOrderVo serviceWorkOrderVo) {
        return workOrderMapper.countServiceWorkOrder(serviceWorkOrderVo);
    }

}
